-- pip install -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com python-lsp-server[all]

-- Rope for Completions and renaming
-- Pyflakes linter to detect various errors
-- McCabe linter for complexity checking
-- pycodestyle linter for style checking
-- pydocstyle linter for docstring style checking (disabled by default)
-- autopep8 for code formatting
-- YAPF for code formatting (preferred over autopep8)
-- flake8 for error checking (disabled by default)
-- pylint for code linting (disabled by default)

-- == 3rd Party Plugins ==
-- pylsp-mypy: MyPy type checking for Python >=3.8.
-- python-lsp-isort: code formatting using isort (automatic import sorting).
-- python-lsp-black: code formatting using Black.
-- pyls-memestra: detecting the use of deprecated APIs.
-- pylsp-rope: Extended refactoring capabilities using Rope.
-- python-lsp-ruff: Extensive and fast linting using ruff. (installed)
--    * This plugin will disable pycodestyle, pyflakes, mccabe, autopep8, and yapf by default
return {
    cmd = { "pylsp" },
    filetypes = {
        "python",
    },
    root_markers = {
        ".git",
    },
    settings = {
        pylsp = {
            plugins = {
                flake8 = {enabled = false},
                ruff = { enabled = true, formatEnabled = false },
            },
        },
    },
}
-- EOP
